<!DOCTYPE html>
<html class="no-js">
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <title>重置密码</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1 user-scalable=no">
        <link rel="stylesheet" href="css/style.css">
    </head>
    <body>
        <div class="resetpass"></div>
        <div class="reset-form">
            <form method="post" action="" onsubmit="return false" id="form1" autocomplete="off">
                <div class="form-item">
                    <label class="form-label"><span>*</span><span>重新设置登录密码</span></label>
                    <input class="text-input" type="password" id="passWord" name="passWord" placeholder="6到16个人字符（字母、数字、符号），区分大小写">
                    <div data-index='0' class="error-mes"></div>
                </div>
                <div class="form-item">
                    <label class="form-label"><span>*</span><span>确认登录密码</span></label>
                    <input class="text-input" type="password" id="confirmPass" name="confirmPass" placeholder="请再次输入密码">
                    <div data-index='1' class="error-mes"></div>
                </div>
                <div class="form-item">
                    <input class="" id="RelatedBut1" type="submit" value="确认">
                </div>
            </form>
        </div>
        <script type="text/javascript" src="http://img.chuandong.com/common/script/jquery.js"></script>
        <script type="text/javascript" src="js/common.js"></script>
        <script>
            $('#RelatedBut1').click(function () {
                var passWord = $('#passWord').val();
                var confirmPass = $('#confirmPass').val();
                if (passWord == "") {
                    $('.error-mes').eq(0).text('请填密码')
                    $("#passWord").focus();
                    return false;
                } else {
                    $('.error-mes').eq(0).text('')
                }
                if (confirmPass == "") {
                    $('.error-mes').eq(1).text('请再次输入密码')
                    $("#Name").focus();
                    return false;
                } else {
                    $('.error-mes').eq(1).text('')
                }
                if (confirmPass !== passWord) {
                    $('.error-mes').eq(1).text('两次密码不同')
                    $('#confirmPass').focus();
                    return false;
                } else {
                    $('.error-mes').eq(1).text('')
                }
            })
            $('input').live('input propertychange',function () {
                if ($('#confirmPass').val() !== '' && $('#passWord').val() !== '' && $('#confirmPass').val() == $('#passWord').val()) {
                    $('#RelatedBut1').css({background:'#ff3433',color:'#fff'})
                }
            })
        </script>
    </body>
</html>